<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    

    <script>
    


    var height =prompt('请输入身高')
    var weight =prompt('请输入体重')

    var num = (height - 108)*2

    
        if((num - weight) <=10 && (num - weight)>=-10){
            alert('体重合适')
        }else{
            alert('体重不合适');
        }

    // (height - 108)*2 - weight <10? console.log('合适'):console.log('不合适');
    
    
    </script>
</body>
</html>